<template>
    <v-row justify="center">
        <v-dialog v-model="dialog" fullscreen :scrim="false" transition="dialog-bottom-transition">
            <v-card>
                <v-toolbar dark color="primary">
                    <v-btn icon dark @click="dialog = false">
                        <v-icon>mdi-close</v-icon>
                    </v-btn>
                    <v-toolbar-title>查看来源</v-toolbar-title>
                    <v-spacer></v-spacer>
                    <!-- <v-toolbar-items>
                        <v-btn variant="text" @click="submit">
                            保存
                        </v-btn>
                    </v-toolbar-items> -->
                </v-toolbar>
                <iframe :src="src" style="width: 100%;height: 100%;" frameborder="0"></iframe>
            </v-card>
        </v-dialog>
    </v-row>
</template>

<script>
export default {
    data(){
        return{
            src:undefined,
            dialog: false,
        }
    },
    methods:{
        setSrc(url){
            if(url==this.src)return
            this.src=url
        },
        toggle(change,url) {
            this.dialog = change
            if(url!=undefined){
                this.setSrc(url)
            }
        },
    }
}
</script>
<style>

</style>
